//////////////////////////////////////////////////////////////////////////////////
// Who  : Lim, Dong-moon (dmlim@nate.com, 011-701-9381)
// When : 2006/??/??
//////////////////////////////////////////////////////////////////////////////////

#ifndef __NCRYPT_TYPES_H__
#define __NCRYPT_TYPES_H__

#ifndef WIN32

typedef unsigned int 			ALG_ID;
typedef unsigned int			DWORD;
typedef unsigned short			WORD;
typedef unsigned int			UINT;
typedef unsigned short			USHORT;
typedef unsigned char			BYTE;
typedef unsigned char*  		LPBYTE;
typedef unsigned short			WCHAR;
typedef char					TCHAR;
typedef char*					LPSTR;
typedef const char*				LPCSTR;
typedef unsigned short*			LPWSTR;
typedef const unsigned short*	LPCWSTR;
typedef char*					LPTSTR;
typedef const char*				LPCTSTR;
typedef void*					HANDLE;
typedef void*					LPVOID;

/*
	BOOL type in MacOS Object-C is defined as singned char
	when compiling library, COMP_DARWIN preprocessor indicates signed char
	when compiling in c++ application __cplusplus preprocessor indicates signed char
*/

#if defined(__APPLE__) && defined(__MACH__) && ( defined(COMP_DARWIN) || defined(__cplusplus) )
typedef	signed char		BOOL;
#else
typedef int				BOOL;
#endif

#define CONST	const

#define TRUE 1
#define FALSE 0
#define _T
#define TEXT

#define CALG_AES_256  0x00006610
#define CALG_AES_192  0x0000660f
#define CALG_AES_128  0x0000660e
#define CALG_3DES     0x00006603
#define CALG_3DES_112 0x00006609
#define CALG_DES      0x00006601
#define CALG_RC4      0x00006801
#define CALG_RC2      0x00006602

#define CALG_DESX     0x00006604
#define CALG_RC5      0x0000660d
#define CALG_AES      0x00006611

#define CALG_MD2      0x00008001
#define CALG_MD5      0x00008003
#define CALG_SHA      0x00008004
#define CALG_SHA1     0x00008004

// Microsoft Specific

#define _ASSERTE			assert
#define CopyMemory			memcpy
#define ZeroMemory(a, b)	memset((a), 0, (b))
#define _tprintf			printf
#define _stprintf			sprintf
#define _ftprintf			fprintf
#define _tcsicmp			strcasecmp
#define _tcscmp				strcmp
#define __cdecl
#define _tmain				main
#define _tfopen				fopen
#define strcmpi				strcasecmp
#define _strdup				strdup
#define lstrcpy				strcpy
#define lstrlen				strlen
#define wsprintf			sprintf
#define _tcsdup				strdup

#endif // WIN32

#endif //__NCRYPT_TYPES_H__
